﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:domain="clr-namespace:daigou.domain;assembly=daigou.domain"
                    xmlns:mv="clr-namespace:daigou.modules.Order;assembly=daigou.modules"
                    xmlns:order="clr-namespace:daigou.modules.Order;assembly=daigou.modules"
                    xmlns:bill="clr-namespace:daigou.modules.Bill;assembly=daigou.modules"
                    xmlns:product="clr-namespace:daigou.modules.Product;assembly=daigou.modules"

>

    <DataTemplate x:Key="ConfigurationListTemplate" DataType="{x:Type domain:Configuration}">
        <StackPanel Orientation="Horizontal">
            <Label Content="{Binding Key}" MinWidth="200"></Label>
            <TextBox Style="{StaticResource TB_NoBorder}" MinWidth="400" Text="{Binding Value, UpdateSourceTrigger=PropertyChanged}" 
                      AcceptsReturn="True" AcceptsTab="True" AutoWordSelection="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible">
                
            </TextBox>
        </StackPanel>
    </DataTemplate>

    <DataTemplate x:Key="RecipientListTemplate" DataType="{x:Type domain:Recipient}">
        <Border Padding="5"  HorizontalAlignment="Stretch">
        <DockPanel>
            <StackPanel Orientation="Horizontal" DockPanel.Dock="Left">
                <TextBlock Text="{Binding ID, StringFormat={}{0}}" Margin="0 0 10 0" MinWidth="50" VerticalAlignment="Center" FontSize="25" Foreground="Gray" />
                    <TextBlock Text="{Binding Name}" 
                           Foreground="{Binding ID, Converter={StaticResource RecipientIDToColorConverter}}" 
                           FontSize="20" 
                           VerticalAlignment="Center" 
                           MinWidth="100"
                           />
                    <TextBlock Text="{Binding PinyinName}"  VerticalAlignment="Center" Foreground="Purple"  FontSize="15"  MinWidth="150" Margin="0 0 10 0" />
                
                    <TextBlock Text="{Binding QQNumber}"  VerticalAlignment="Center" Foreground="DarkRed"  FontSize="20" />
             </StackPanel>
                <StackPanel Orientation="Horizontal" DockPanel.Dock="Right" >
                    <TextBlock Text="{Binding Remark}" VerticalAlignment="Center" Foreground="OrangeRed" FontWeight="Black"/>                    
              </StackPanel>

                <StackPanel Orientation="Vertical" Margin="20 0 0 0" >
                <TextBlock Text="{Binding FormatDisplay}" VerticalAlignment="Center" Foreground="DarkBlue"/>
                <TextBlock Text="{Binding AgentName}" VerticalAlignment="Center" Foreground="DarkBlue"/>
             </StackPanel>            
        </DockPanel>
        </Border>
    </DataTemplate>

    <DataTemplate x:Key="OrderListTemplate" DataType="{x:Type mv:OrderViewModel}">
        

        
        <Grid VerticalAlignment="Center" HorizontalAlignment="Stretch" Margin="4,4,4,4" Background="Transparent">

            <Grid.ContextMenu>
                <ContextMenu >
                    <MenuItem Header="保存" Command="{Binding SaveChangeCommand}" />
                    <MenuItem Header="选中" Command="{Binding ItemDoubleClickCommand}"/>
                </ContextMenu>
            </Grid.ContextMenu>
            
            <Grid.InputBindings>
                <MouseBinding Gesture="LeftDoubleClick" Command="{Binding ItemDoubleClickCommand}"/>
            </Grid.InputBindings>

            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <DockPanel Grid.Column="0" Grid.Row="0">
                <CheckBox DockPanel.Dock="Left" IsChecked="{Binding IsSelected}" VerticalAlignment="Center" Margin="5 0 0 0 " >
                    <CheckBox.Content>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock DockPanel.Dock="Left" Text="{Binding Order.ID}" Width="30"  VerticalAlignment="Center" Margin="5 0 0 0 " />
                        </StackPanel>
                    </CheckBox.Content>
                </CheckBox>
                <TextBlock DockPanel.Dock="Left" Text="{Binding Recipient.Name}" Opacity="{Binding HasWaybillSn, Converter={StaticResource BooleanToOpacityConverter}}" FontSize="30" Width="100"  VerticalAlignment="Center" Margin="5 0 0 0 " />
                <StackPanel Orientation="Vertical">
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding Order.CreatedTime, StringFormat={}{0:yyyy.MM.dd}}" FontSize="10" VerticalAlignment="Center" Margin="5 0 0 0 " />
                        <TextBlock Text="{Binding Order.DhlSn}" FontSize="10" VerticalAlignment="Center" Margin="5 0 0 0 " />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding Recipient.CnAddress}"  HorizontalAlignment="Stretch" Margin="5 0 0 0 " VerticalAlignment="Center" />
                        <TextBlock Text="{Binding Recipient.MainTel}"  HorizontalAlignment="Stretch" Margin="5 0 0 0 " VerticalAlignment="Center" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding RecipientPinyinName}"  HorizontalAlignment="Stretch" Margin="5 0 0 0 " VerticalAlignment="Center" />
                    </StackPanel>
                </StackPanel>
                
              
                
            </DockPanel>            
            <StackPanel Orientation="Horizontal" Grid.Column="0" Grid.Row="1">
                <Label  Style="{StaticResource Lb_Tag}" Background="{Binding IsSelected, Converter={StaticResource BooleanToGreyGreenConverter}}" ContentStringFormat="{}{0}KG" MinWidth="60" Foreground="DarkBlue"           Content="{Binding Order.PacketWeight}" />
                <Label  Style="{StaticResource Lb_Tag}" Visibility="{Binding IsOrderBillwayApplyEmailSent, Converter={StaticResource BooleanToVisibilityConverter}}"  MinWidth="60"  Background="YellowGreen"   Content="未发申请" />
                <Label  Style="{StaticResource Lb_Tag}" Visibility="{Binding HasWaybillSn, Converter={StaticResource BooleanToVisibilityConverter}}"  MinWidth="60"  Background="Gold"   Content="未处理" />
                <Label  Style="{StaticResource Lb_Tag}" Visibility="{Binding IsOrderWaitToBeSent, Converter={StaticResource BooleanToVisibilityConverter}}"  MinWidth="60"  Background="Orange"   Content="未发货" />
                
                <TextBox Style="{StaticResource TB_NoBorder}"    
                         Text="{Binding Order.Detail}" 
                         AcceptsReturn="True" AcceptsTab="True" AutoWordSelection="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible"
                         Background="White"  Padding="3" MinWidth="200" BorderThickness="1" BorderBrush="DarkBlue"
                />
                <Button Content="6X" Padding="10 0" Background="Lavender" Height="30" Margin="10 0" Command="{Binding Add6XCommand}" />
                <Button Content="8X" Padding="10 0" Background="Gold" Height="30" Margin="10 0" Command="{Binding Add8XCommand}"/>                
                <Label Content="同名重复参数" VerticalAlignment="Center" ></Label>
                <TextBox Style="{StaticResource TB_NoBorder}" Text="{Binding NameIndex}" VerticalAlignment="Center"                          
                        Background="White" BorderThickness="1" BorderBrush="DarkBlue" MinWidth="200"/>

            </StackPanel>

            <DockPanel Grid.RowSpan="1"   Grid.Row="2">
                <TextBlock Text="详细内容" DockPanel.Dock="Left"></TextBlock>
                <TextBox Style="{StaticResource TB_NoBorder}" HorizontalAlignment="Left" DockPanel.Dock="Left"
                         Text="{Binding Order.Content}" 
                         AcceptsReturn="True" AcceptsTab="True" AutoWordSelection="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible"
                         Background="White" BorderThickness="1" BorderBrush="DarkBlue" Margin="18 0 0 0" MinWidth="450"
                />
                
            </DockPanel>

            <Label  Foreground="{Binding IsSelected, Converter={StaticResource BooleanToGreyGreenConverter}}" FontSize="55" Grid.RowSpan="3" ContentStringFormat="{}{0}KG"  HorizontalAlignment="Right"    Content="{Binding Order.PacketWeight}" />
            <Label  FontSize="20" Grid.Row="2"  Grid.RowSpan="3"  HorizontalAlignment="Right"  Content="{Binding Recipient.AgentName}" />
        </Grid>
    </DataTemplate>

    <DataTemplate  x:Key="ProductListTemplate" DataType="{x:Type product:ProductItemViewModel}">
        <Border BorderThickness="1 1 1 0" BorderBrush="DarkBlue" Margin="0" Padding="0" >
            <Grid  Margin="0" Background="{Binding IsSelected, Converter={StaticResource BooleanToBlueGreyConverter}}" Height="78" Opacity="0.8">
                <Grid.InputBindings>
                    <MouseBinding Gesture="LeftDoubleClick" Command="{Binding ItemDoubleClickSelectCommand}"/>
                </Grid.InputBindings>
                <Grid.Resources>
                    <Style TargetType="Label">
                        <Setter Property="Background" Value="{x:Null}" />
                        <Setter Property="Padding" Value="0"/>
                        <Setter Property="Margin" Value="0"/>
                        <Setter Property="FontSize" Value="13"/>
                        <Setter Property="HorizontalAlignment" Value="Stretch"/>
                        <Setter Property="VerticalAlignment" Value="Center"/>
                        <Setter Property="Foreground" Value="DarkBlue"/>
                    </Style>
                </Grid.Resources>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="75" />
                    <ColumnDefinition Width="180" />
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="150" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="*" />

                </Grid.RowDefinitions>

                <Image Grid.Column="0" Grid.RowSpan="5" x:Name="imgPhoto"   Source="{Binding DomainProduct.Photo, Converter={StaticResource PathToImageConverter}}"    HorizontalAlignment="Stretch" Margin="3"  StretchDirection="Both"  VerticalAlignment="Stretch" />

                <Label Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" FontWeight="Black"  FontSize="20" Content="{Binding DomainProduct.Code}" />
                <Label Grid.Column="1" Grid.Row="2" Grid.RowSpan="2" FontSize="20"    Content="{Binding DomainProduct.Brand}" />
                
                <CheckBox FontSize="12" Content="{Binding DomainProduct.Catagory}" Grid.Column="1" Grid.Row="4" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Name="checkBox1" IsChecked="{Binding IsSelected}"/>
                
                <Label Margin="0" Padding="0" Grid.Column="2" Grid.ColumnSpan="1" Grid.Row="4"  Content="{Binding DomainProduct.Remark}"  />
                
                <StackPanel Grid.Column="2" Grid.Row="0" Grid.RowSpan="2"  Orientation="Horizontal"    >
                    <Label FontWeight="Black"  FontSize="20" Content="{Binding DomainProduct.Name}" />
                    <Label FontWeight="Black"  Content="            "/>
                    <Label FontWeight="Black" FontSize="20" Foreground="OrangeRed" Content="{Binding SellPrice}"/>
                    <Label FontWeight="Black" FontSize="20"  Foreground="OrangeRed" Content="￥"/>
                  
                </StackPanel>

                <StackPanel Grid.Column="2" Grid.Row="0" Grid.RowSpan="2"  Orientation="Horizontal"  HorizontalAlignment="Right"   >
                    <Label FontWeight="Black" FontSize="20" Foreground="DarkGreen" Content="{Binding DomainProduct.GrossWeight}"/>
                    <Label FontWeight="Black" FontSize="20"  Foreground="DarkGreen" Content="克  "/>
                </StackPanel>

                <Grid Grid.Column="2" Grid.Row="2" Grid.RowSpan="2" >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="auto" />
                        <ColumnDefinition Width="*" />

                        <ColumnDefinition Width="auto" />
                        <ColumnDefinition Width="*" />

                        <ColumnDefinition Width="auto" />
                        <ColumnDefinition Width="*" />

                        <ColumnDefinition Width="auto" />
                        <ColumnDefinition Width="*" />

                    </Grid.ColumnDefinitions>
                    <Label Grid.Column="0" FontWeight="Black" Content="规格:"  />
                    <Label Grid.Column="1" MinWidth="120" Content="{Binding DomainProduct.Spec}"  />

                    <Label Grid.Column="2" FontWeight="Black" Content="适用人群:"  />
                    <Label Grid.Column="3" MinWidth="120" Content="{Binding DomainProduct.ApplicableCrowd}"  />

                    <Label Grid.Column="4" Content="标签:" FontWeight="Black" />
                    <Label Grid.Column="5" MinWidth="120" Content="{Binding DomainProduct.TagList}"  />

                </Grid>

                <StackPanel Grid.Column="3" Grid.Row="0"  Grid.RowSpan="5">
                    <StackPanel Orientation="Horizontal">
                        <Label FontSize="10" Content="ID->"  />
                        <Label FontSize="10" Content="{Binding DomainProduct.ID}" FontWeight="Black" />
                    </StackPanel>
                    <StackPanel   Orientation="Horizontal">
                        <Label FontSize="10" Content="ImportPrice->"  />
                        <Label FontSize="10" Content="{Binding DomainProduct.ImportPrice}"  />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <Label FontSize="10" Content="GrossProfit->"  />
                        <Label FontSize="10" Content="{Binding GrossProfit}"  />
                    </StackPanel>
                    
                </StackPanel>
            </Grid>
        </Border>
    </DataTemplate>

    <DataTemplate  x:Key="BillItemTemplate" DataType="{x:Type bill:BillItemVM}">
        <Border BorderThickness="0 1 0 0" BorderBrush="LightGray" Background="{x:Null}" Margin="0" Padding="0">
            <Grid  Margin="0" Background="{x:Null}">
                <Grid.Resources>
                    <Style TargetType="Label">
                        <Setter Property="Background" Value="{x:Null}" />
                        <Setter Property="Padding" Value="0"/>
                        <Setter Property="Margin" Value="0"/>
                        <Setter Property="FontSize" Value="15"/>
                        <Setter Property="HorizontalAlignment" Value="Stretch"/>
                        <Setter Property="VerticalAlignment" Value="Center"/>
                        <Setter Property="Foreground" Value="DarkBlue"/>
                    </Style>
                    <Style TargetType="TextBox">
                                               
                        <Setter Property="FontSize" Value="12"/>                        
                    </Style>
                </Grid.Resources>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="90" /> <!--0-->
                    <ColumnDefinition Width="300" />  <!--1-->
                    <ColumnDefinition Width="*" /> <!--2-->
                    <ColumnDefinition Width="300" /> <!--3-->
                    <ColumnDefinition Width="50" /> <!--4-->
                    <ColumnDefinition Width="50" />
                
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="22" />
                </Grid.RowDefinitions>

                <StackPanel Grid.Column="0" Orientation="Horizontal"  Background="{x:Null}" >
                <Label FontWeight="Black" Content="{Binding ProductCode}" />
                </StackPanel>


                <StackPanel Grid.Column="1" Orientation="Horizontal"  Background="{x:Null}" >
                    <TextBox Style="{StaticResource TB_NoBorder}" FontSize="12" MinWidth="70" HorizontalContentAlignment="Right" Text="{Binding DomainBillItem.SellPrice}" FontWeight="Black" />
                    <Label Content="￥ × " />
                    <TextBox  Style="{StaticResource TB_NoBorder}" FontSize="12" MinWidth="25" HorizontalContentAlignment="Center" Text="{Binding DomainBillItem.Count}" FontWeight="Black"/>
                    <Label Content=" = " />
                    <Label  Content="{Binding Summary}" FontWeight="Black" HorizontalContentAlignment="Left" />
                    <Label Content="￥"/>
                </StackPanel>

                <StackPanel Grid.Column="2" Orientation="Horizontal" Background="{x:Null}">
                    <Label   Content="{Binding ProductName}"   />
                    <TextBox  Style="{StaticResource TB_NoBorder}" FontSize="12" Margin="0" Padding="0"  VerticalAlignment="Stretch" VerticalContentAlignment="Center" Foreground="DarkBlue" FontWeight="Black"  MinWidth="100"   Text="{Binding DomainBillItem.Remark}" />
                </StackPanel>

                <StackPanel Grid.Column="3" Orientation="Horizontal"   Background="{x:Null}" >
                    <Label  Content="规格: " />
                    <Label  Content="{Binding ProductSpec}" MinWidth="150" />
                    <Label  Content="重量: " />
                    <Label  Content="{Binding WeightSummary}" />
                    <Label  Content="kg" />
                </StackPanel>

               

                <TextBlock Grid.Column="5" VerticalAlignment="Center">
                   <Hyperlink  Command="{Binding DeleteCommand}" TextDecorations="None" >
                      <Image Width="16" Height=" 16" Source="/daigou.main;component/Images/delete.png" />
                   </Hyperlink>
                </TextBlock>
                
            </Grid>
        </Border>
    </DataTemplate>

    <DataTemplate  x:Key="BillListItemTemplate" DataType="{x:Type bill:BillViewModel}">
        <Border BorderThickness="0 3 0 0" BorderBrush="DarkBlue"  Background="{Binding IsSelected, Converter={StaticResource BooleanToBlueGreyConverter}}" Opacity="0.8" Margin="0" Padding="0">
            <Grid  Margin="8" Background="{x:Null}">
                <Grid.InputBindings>
                    <MouseBinding Gesture="LeftDoubleClick" Command="{Binding ItemDoubleClickSelectCommand}"/>
                </Grid.InputBindings>
                <Grid.Resources>
                    <Style TargetType="Label">
                        <Setter Property="Background" Value="{x:Null}" />
                        <Setter Property="Padding" Value="0"/>
                        <Setter Property="Margin" Value="0"/>
                        <Setter Property="FontSize" Value="13"/>
                        <Setter Property="HorizontalAlignment" Value="Stretch"/>
                        <Setter Property="VerticalAlignment" Value="Center"/>
                        <Setter Property="VerticalContentAlignment" Value="Center"/>
                        <Setter Property="Foreground" Value="DarkBlue"/>
                    </Style>
                </Grid.Resources>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="180" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>

                <StackPanel Grid.Column="0" Grid.Row="0" Orientation="Horizontal">

                    <Label FontWeight="Black"  Content="收件人: " />
                    <TextBox  FontSize="18" Style="{StaticResource TB_NoBorder}" FontWeight="Black" VerticalAlignment="Center" VerticalContentAlignment="Center"  Text="{Binding DomainBill.CustomerName}" MinWidth="100" />


                    <Label Content="        " />

                    <Label Content="账单编号: " />
                    <Label FontWeight="Black"  Content="{Binding DomainBill.Id}" ContentStringFormat="{}Nx{0:D4}" Foreground="DarkOrchid" />

                    <Label Content="        " />
                    
                    <Label Content="创建时间: " />
                    <Label FontWeight="Black"  Content="{Binding DomainBill.CreatedTime,Converter={StaticResource DateTimeToStringConverter}}" />

                    <Label FontWeight="Black"   Content="        " />

                    <Label FontWeight="Black"  Content="总计: " />
                    <Label  Content="{Binding Summary}"   Foreground="OrangeRed"/>
                    <Label  Content="元" />

                    <Label FontWeight="Black"   Content="        " />

                    <Label FontWeight="Black"  Content="重量总计: " />
                    <Label  Content="{Binding WeightSummary}"   Foreground="BlueViolet"/>
                    <Label  Content="kg" />

                    <Label FontWeight="Black"   Content="        " />


                    <Label  FontWeight="Black"  Content="备注: " />
                    <TextBox FontSize="13" Style="{StaticResource TB_NoBorder}" VerticalAlignment="Center" VerticalContentAlignment="Center"  MinWidth="100"  Text="{Binding DomainBill.Remark}" />


                </StackPanel>

                <Label Grid.Row="1" FontWeight="Black" Width="100" Content="详情 "  HorizontalAlignment="Left" >

                </Label>

                <!--SelectedItem="{Binding SelectedItem}"-->
                <ListView  Grid.Row="1"
                   ItemsSource="{Binding BillItemVMList}"
                   ItemTemplate="{StaticResource  BillItemTemplate}"
                           Margin="50 0 0 0"
                   BorderBrush="{x:Null}"
                   HorizontalAlignment="Stretch"                    
                   Name="list" 
                   VerticalAlignment="Stretch" 
                   HorizontalContentAlignment="Stretch"
                   ScrollViewer.VerticalScrollBarVisibility="Auto"
                   Background="{x:Null}"
                   VirtualizingStackPanel.IsVirtualizing ="True" FontSize="18">
                </ListView>


                <StackPanel Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" Orientation="Vertical">
                    <TextBlock Grid.Column="5" FontSize="12" VerticalAlignment="Center" >
                        <Hyperlink  Command="{Binding CopyDetailCommand}"  TextDecorations="None" >
                            <Image Width="16" Height=" 16" Source="/daigou.main;component/Images/form_blue.png" />
                           <Label VerticalAlignment="Center">复制详情</Label> 
                        </Hyperlink>
                        
                    </TextBlock>

                    
                </StackPanel>

            </Grid>
        </Border>
    </DataTemplate>


    <DataTemplate  x:Key="SimpleProductListTemplate" DataType="{x:Type product:ProductItemViewModel}">
        <Border BorderThickness="1 1 1 0" BorderBrush="DarkBlue" Margin="0" Padding="0">
            <Grid  Margin="0" Background="#AAD3E1E8">
                <Grid.ContextMenu>
                    <ContextMenu >
                        <MenuItem Header="保存" Command="{Binding SaveChangeCommand}" />
                        <MenuItem Header="选中" Command="{Binding ItemDoubleClickCommand}"/>
                    </ContextMenu>
                </Grid.ContextMenu>

                <Grid.InputBindings>
                    <MouseBinding Gesture="LeftDoubleClick" Command="{Binding ItemDoubleClickCommand}"/>
                </Grid.InputBindings>

                <Grid.Resources>
                    <Style TargetType="Label">
                        <Setter Property="Background" Value="{x:Null}" />
                        <Setter Property="Padding" Value="0"/>
                        <Setter Property="Margin" Value="0"/>
                        <Setter Property="FontSize" Value="13"/>
                        <Setter Property="HorizontalAlignment" Value="Stretch"/>
                        <Setter Property="VerticalAlignment" Value="Center"/>
                        <Setter Property="Foreground" Value="DarkBlue"/>
                    </Style>
                </Grid.Resources>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="100" />
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="auto" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                
                <Label Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" FontWeight="Black" Content="{Binding DomainProduct.Code}" Margin="0 0 0 0"/>                    
                
                
                <Label Grid.Column="1" Grid.Row="0" FontSize="10"  Content="{Binding DomainProduct.Brand}" Margin="0 0 0 0" />                
                                
                <StackPanel Grid.Column="1" Grid.Row="1" Orientation="Horizontal">
                <Label Content="{Binding DomainProduct.ID}" FontWeight="Black" />
                <Label      Content="-" />
                <Label      Content="{Binding DomainProduct.Name}" />
                <Label      Content="-" />
                <Label      Content="{Binding DomainProduct.Spec}"  />
                </StackPanel>

                <StackPanel Grid.Column="2" Grid.Row="0" Grid.RowSpan="2" Orientation="Horizontal">
                    <Label      Content="{Binding SellPrice}" Margin="20 0 0 0"/>
                    <Label      Content="￥" Margin="0 0 0 0"/>
                </StackPanel>

            </Grid>
        </Border>
    </DataTemplate>



</ResourceDictionary>